package com.example.controller;

import com.example.common.AliyunUtil;
import com.example.common.Result;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author ASUS
 */
@RestController
public class fef {

    @PostMapping("/files/upload")

    public String upLoad(@RequestParam MultipartFile multipartFile) throws IOException {

        AliyunUtil aliOSSUtils = new AliyunUtil();
        String upload = aliOSSUtils.upload(multipartFile);
        return upload;
    }

}